package org.example.demos.suanfati;

public class Cow {

    public static void main(String[] args) {
        Cow cow = new Cow();
        System.out.println(cow.cow(10));
    }

    private int cow(int n){
        int res = 0;
        int step = 1;
        for (int i=1;i<=n;i++){
            if(i%4==0){
                step++;
            }
            res+=step;
            System.out.println("第"+i+"年，："+res);

        }
        return res;
    }
    //到15岁绝育，不再能生，20岁死亡
    private int cowcandie(int n){

        return 0;
    }
}
